package com.example.mangodb.Serives;

import com.example.mangodb.domain.User;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author: 普发忠
 * @Date: 2021/09/18/11:56
 */
public interface IUserService {
    
    void save(User user);
    void update(User user);
    void  delete(String id);
    User getUser(String id);
    List<User> getUsers();
    //通过name字段查询
    User findByName(String name);
    

    //通过name和age查询
    User findByNameAndAge(String name, int age);
    
    User findByIdAndName(String id,String age);
    
}
